﻿package pk;

public class MainActivity extends Activity {

protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);


  Thread mThread = new Thread(updatethread);
         mThread.start();


}

Runnable updatethread =new Runnable(){
   @Override  
   public void run() {
   while(true){
   i=i+10;
   try{
   Thread.sleep(2000);
   }
   catch(Exception e){
   e.printStackTrace();
   }
   if(i==100)
   i=0;
   pressbar1.setProgress(i);
   }}
   };


}
